<%@ page import="java.util.*" pageEncoding="utf-8" %>
<%@include file="/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<fmt:bundle basename="res">
<head>
    <meta charset="utf-8">
    <title><fmt:message key='ttblsjxt'/></title>
    <jsp:include page="/WEB-INF/commons/commons-header.jsp" flush="true"/>
    <style>
        html {
            background: #fff;
        }
    </style>
</head>

<body>
<div class="layui-container">
    <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">

        <form:form commandName="seckill" method="${_method }" class="layui-form" id="form">
            <input type="hidden" name="_method" value="${_method }"/>
            <form:hidden path="id"/>

            <div class="layui-form-item">
                <label class="layui-form-label"><fmt:message key='mscc'/></label>
                <div class="layui-form-mid layui-word-aux">
                        ${seckill.seckillSession.name}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='msrq'/></label>
                <div class="layui-form-mid layui-word-aux">
                        ${seckill.seckillSession.seckillTime}
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='mssj'/></label>
                <div class="layui-form-mid layui-word-aux" id="seckillRoundTime">
                        ${seckill.seckillSession.seckillBeginTime}~${seckill.seckillSession.seckillEndTime}
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='bmjzsj'/></label>
                <div class="layui-form-mid layui-word-aux" id="applyDeadline">${seckill.seckillSession.applyDeadline}</div>
            </div>

            <div class="layui-form-item feijin-zenpin-area">
                <label class="layui-form-label"><b style="color:red">*</b> <fmt:message key='mssp'/></label>
                <div class="layui-input-block">
                    <table class="layui-table" lay-size="sm" id="feijin-sku-table">
                        <thead>
                        <tr>
                            <th><fmt:message key='spbh'/></th>
                            <th><fmt:message key='spmc'/></th>
                            <th><fmt:message key='scj'/></th>
                            <th><fmt:message key='msj'/></th>
                            <th><fmt:message key='gg'/></th>
                            <th><fmt:message key='kc'/></th>
                            <th><fmt:message key='xsj'/></th>
                            <th><fmt:message key='hdkc'/></th>
                            <th><fmt:message key='hdjg'/></th>
                            <th><fmt:message key='xgsl'/></th>
                        </tr>
                        </thead>
                        <tbody id="goodsArea">

                        <c:forEach items="${seckillGoodses}" var="item">

                            <tr data-id='${item.goods.id}' class='feijin-goods-ids'>
                                <td rowspan='${fn:length(item.goods.skus) + 1}'>${item.goods.goodsNo}</td>
                                <td rowspan='${fn:length(item.goods.skus) + 1}'>${item.goods.name}</td>
                                <td rowspan='${fn:length(item.goods.skus) + 1}'><fmt:formatNumber type="CURRENCY" value="${item.goods.marketPrice}"/></td>
                                <td rowspan='${fn:length(item.goods.skus) + 1}'><fmt:formatNumber type="CURRENCY" value="${item.goods.seckillPrice}"/></td>
                            </tr>

                            <c:forEach items="${item.goods.skus}" var="sku">
                                <tr class='skus' data-id='${sku.id}'>
                                    <td>${sku.skuNames}</td>
                                    <td>${sku.store}</td>
                                    <td>${sku.price }</td>
                                    <td>${sku.seckillStore}</td>
                                    <td>${sku.seckillPrice}</td>
                                    <td>${sku.seckillLimit}</td>
                                </tr>
                            </c:forEach>


                        </c:forEach>

                        </tbody>

                    </table>

                </div>
            </div>


        </form:form>
    </div>
</div>
<script>
    layui.use(['form']);
</script>
</body>
</fmt:bundle>
</html>